ISGlobal
2024-01-11
A is a measure of SEP and outcome Y is diagnosis of ADHD. The censoring variable C is a collider on this pathway, and L is a confounder. To estimate the effect of A on Y we should NOT adjust for C (Figure 1).The problem is that in the 1st follow-up, we are implicitly adjusting for C as well, thus opening another path.
Thus, censoring due to loss to follow-up can introduce selection bias. Generally, we are interested then in estimating an effect if nobody had been censored. If A is binary, we are interested in:
\[E\left[Y ^ {a=1,c=0}\right] - E\left[Y ^ {a=0,c=0}\right],\]
which is the joint effect of A and C.
IP weights can be used to estimate 1 our causal effect (to estimate the parameters of the MSM \(E\left[Y^{a,c=0}\right] = \beta_0 + \beta_1a\)):
\[W ^ {A,C} = W^A \times W^C,\]
with \(W^C = 1 / Pr\left[C=0|L,A\right]\) (\(W^C=0\) for the censored), and \(W^A\) being the weights to adjust for confounding (\(f(A|L)\)).
Alternatively, we can compute the stabilized IP weights:
\[SW^C = Pr\left[C=0|A\right] / Pr\left[C=0|L,A\right].\]
Alternatively, we can use standardization (outcome modeling) to adjust for confounding and selection bias.
SelectionWeights R packageSelectionWeights) for that:sel_weights <- SelectionWeights::estimate_selection_weights(
dat = dat,
id_str = "HelixID",
ids_not_censored = ids_not_censored,
formula = "sex + age + SEP",
method_estimation = "glm",
link_function = "gaussian",
stabilized = TRUE,
winsorization = 0.9,
estimate_by = "cohort",
sampling_weights = NULL,
moments = NULL,
interactions = NULL,
library_sl = NULL,
cv_control_sl = NULL,
discrete_sl = NULL
)
mod <- glm(
outcome ~ exposure + sex + age + SEP,
data = dat,
weights = sel_weights
)docx tables for your papers).